@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --foreground-rgb: 0, 0, 0;
  --background-rgb: 255, 255, 255;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

body {
  color: rgb(var(--foreground-rgb));
  background: rgb(var(--background-rgb));
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 移动端优化 */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

/* 链接过渡效果 */
a {
  transition: all 0.2s ease-in-out;
}

/* 卡片悬停效果 */
.MuiCard-root {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.MuiCard-root:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.1), 0 3px 7px -3px rgba(0, 0, 0, 0.1);
}

/* 按钮点击效果 */
.MuiButton-root {
  transition: transform 0.1s ease-in-out;
}

.MuiButton-root:active {
  transform: scale(0.98);
}

/* 图片加载优化 */
img {
  transition: opacity 0.3s ease-in-out;
}

img.loading {
  opacity: 0;
}

img.loaded {
  opacity: 1;
}
